﻿<%@ Page Title="帐户清单-RBAC" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="RBAC.Administry.Account.List" %>
<%@ Register Src="~/Control/EmptyData.ascx" TagName="EmptyData" TagPrefix="uc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../style/css/jquery.jgrowl.css" rel="stylesheet" type="text/css" />
    <script src="../script/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../script/jquery.jgrowl_compressed.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        function done() {
            $.jGrowl("账户已删除!", { life: 1500 });
        }
    </script>
    
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
    <asp:ScriptManager runat="server" />
    
    <h2 class="pagetitle account-group-32">账户清单</h2>
    
    <table class="toolbar">
        <tr>
            <td>
                <a href="Add.aspx" class="btn"><span class="icon icon-add"></span>添加账户</a>
            </td>
        </tr>
    </table>
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        <p>
            <asp:GridView ID="grid" runat="server" DataKeyNames="ID" 
                AutoGenerateColumns="false" 
                CssClass="stylized full" 
                AllowPaging="true"
                PageSize="15" 
                OnRowCommand="grid_RowCommand" 
                onpageindexchanging="grid_PageIndexChanging" >
                <EmptyDataTemplate>
                    <uc:EmptyData ID="EmptyData1" runat="server" />
                </EmptyDataTemplate>
                <Columns>
                    <asp:BoundField HeaderText="名称" DataField="ID" />
                    <asp:BoundField HeaderText="描述" DataField="Display" />
                    <asp:HyperLinkField DataNavigateUrlFields="ID" 
                        Text="角色指派" 
                        ControlStyle-CssClass="linkcmd cmd-assign" 
                        DataNavigateUrlFormatString="Actor.aspx?account={0}" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton runat="server" Text="删除" CssClass="linkcmd cmd-del" 
                                CommandName="_delete" CommandArgument='<%#Eval("ID")%>' 
                                OnClientClick="return confirm('确定要删除吗?');"/>
                        </ItemTemplate>
                    </asp:TemplateField>

                </Columns>
                <PagerSettings Mode="NumericFirstLast" FirstPageText="«" LastPageText="»" />
            </asp:GridView>
        </p>
        </ContentTemplate>    
    </asp:UpdatePanel>

</asp:Content>
